package com.xuln.common.category.form;

import java.util.List;

import com.xuln.common.category.entity.Category;
import com.xuln.framework.form.BaseForm;

public class CategoryForm extends BaseForm {
	private Long parentId = 0L;// 上级分类
	private String name;// 分类名称
	private String categoryType;
	private String metaKeywords;// 页面关键词
	private String metaDescription;// 页面描述
	private String description;// 页面描述
	private Integer orderList;// 排序

	private Category category;
	private List<Category> parents;
	private List<Category> childs;

	public Long getParentId() {
		return parentId;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getMetaKeywords() {
		return metaKeywords;
	}

	public void setMetaKeywords(String metaKeywords) {
		this.metaKeywords = metaKeywords;
	}

	public String getMetaDescription() {
		return metaDescription;
	}

	public void setMetaDescription(String metaDescription) {
		this.metaDescription = metaDescription;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Integer getOrderList() {
		return orderList;
	}

	public void setOrderList(Integer orderList) {
		this.orderList = orderList;
	}

	public String getCategoryType() {
		return categoryType;
	}

	public void setCategoryType(String categoryType) {
		this.categoryType = categoryType;
	}

	public List<Category> getChilds() {
		return childs;
	}

	public void setChilds(List<Category> childs) {
		this.childs = childs;
	}

	public void setCategory(Category category) {
		this.category = category;
	}

	public Category getCategory() {
		return category;
	}

	public List<Category> getParents() {
		return parents;
	}

	public void setParents(List<Category> parents) {
		this.parents = parents;
	}

	public Category copy() {
		Category category = new Category();
		category.setCategoryType(categoryType);
		category.setDescription(description);
		category.setMetaDescription(metaDescription);
		category.setMetaKeywords(metaKeywords);
		category.setName(name);
		category.setOrderList(orderList);
		return category;
	}
}
